const {ccclass, property} = cc._decorator;

@ccclass
export default class NewClass extends cc.Component {

    @property
    speed: number = 50;

    @property
    moveDuration: number = 100;

    @property
    isTouched: boolean = false;


    // LIFE-CYCLE CALLBACKS:

    onLoad() {
//        var moveBy = cc.moveBy(2, cc.p(0, this.speed));
//        this.node.runAction(moveBy);
    }

    setTouched(isTouched: boolean){
        this.isTouched = isTouched;
    }

    getTouched(): boolean{
        return this.isTouched;
    }

    start() {
    }

    moveTo(pos: cc.Vec2){
//        this.node.runAction(cc.moveTo(0, pos));
        this.node.setPosition(pos.x, pos.y);
    }

    update(dt) {
    }
}
